package com.example.springbootintegration.common;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.List;

@Getter
@Setter
@NoArgsConstructor
public class PageVo<T> {
    //当前页码
    private long current;
    //每页条数
    private long size;
    // 总条数
    private long total;
    // 总页数
    private long pages;
    // 数据列表
    private List<T> records;

    public PageVo(long current, long size) {
        this.current = current;
        this.size = size;
    }

    public PageVo(long current, long size, long total, long pages, List<T> records) {
        this.current = current;
        this.size = size;
        this.total = total;
        this.pages = pages;
        this.records = records;
    }
}